package com.hundsun.aitest.model.ai;

import lombok.Data;
import lombok.ToString;

@Data
public class TestPoint {
    private String testPurpose;
    private TestParameters parameters;
    private String testResult;
    private String caseSideType;
    private String casePriority;
    //Todo 目前不考虑多个前置sql的场景
    private String preSql; // 新增的参数
    private String dbConnection; // 新增的参数
    // private String precisionTest = "2"; // 精准测试（0：前置；1：后置；2：空）
    private String afterSql; // 新增的参数

    public TestPoint(String testPurpose, TestParameters parameters, String testResult, String caseSideType, String casePriority, String preSql, String dbConnection) {
        this.testPurpose = testPurpose;
        this.parameters = parameters;
        this.testResult = testResult;
        this.caseSideType = caseSideType;
        this.casePriority = casePriority;
        this.preSql = preSql;
        this.dbConnection = dbConnection;
    }

    public TestPoint(String testPurpose, TestParameters parameters, String testResult, String caseSideType,
                     String casePriority, String preSql, String dbConnection, String afterSql) {
        this.testPurpose = testPurpose;
        this.parameters = parameters;
        this.testResult = testResult;
        this.caseSideType = caseSideType;
        this.casePriority = casePriority;
        this.preSql = preSql;
        this.dbConnection = dbConnection;
        this.afterSql = afterSql;
    }

    @Override
    public String toString() {
        return "TestPoint{" +
                "testPurpose='" + testPurpose + '\'' +
                ", parameters=" + (parameters != null ? parameters.toString() : "null") +
                ", testResult='" + testResult + '\'' +
                ", caseSideType='" + caseSideType + '\'' +
                ", casePriority='" + casePriority + '\'' +
                ", preSql='" + preSql + '\'' +
                ", dbConnection='" + dbConnection + '\'' +
                ", dbConnection='" + dbConnection + '\'' +
                ", afterSql='" + afterSql + '\'' +
                '}';
    }
}